import { createStore } from "vuex";
// 创建一个新的 store 实例
const store = createStore({
  state() {
    return {
      pageId: "",
      teamId: "",
    };
  },
  mutations: {
    changePageId(state, payload) {
      state.pageId = payload;
    },
    changeTeamId(state, payload) {
      state.teamId = payload;
    },
  },
  actions: {
    actionsPageId(context) {
      context.commit("changePageId", payload);
    },
  },
});

export default store;
